<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%String path = request.getContextPath();String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()+ path + "/";%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="css/maintable.css"></link>
<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
<script type="text/javascript">
$(function(){
	$("table tr").mouseover(function(){
		$(this).css("background","#D3EAEF");
		$(this).siblings().css("background","white");
	});
});
</script>					


</head>

<body>

	<div class="div_title">
		<div class="div_titlename">
			<img src="images/san_jiao.gif"><span>系统中的角色列表</span>
		</div>
	</div>

	<form action="AdminServlet.do" name="form1">
		<input type="hidden" name="flag" value="delAdmins" />
		<table class="main_table">
			<tr>
				<th>角色名称</th>
				<th>角色描述</th>
				<th>操作</th>
			</tr>
			
			<c:forEach var="role" items="${roleList}">
				<tr>

					<td>${role.roleName }</td>
					
					<td><a style="width:80px;white-space:nowrap;overflow: hidden;text-overflow: ellipsis;display: block;"  title="${role.des }">${role.des}</a></td>

					<td>
						<a href="RoleServlet.do?flag=searchforupdate&id=${role.id}">修改</a> |  
						
						<a href="RoleServlet.do?flag=del&id=${role.id}" onClick="return confirm('确定删除?')">删除</a> |  
						
						<a href="RoleServlet.do?flag=roleEdit&roleId=${role.id}">角色权限分配</a>
					</td>
							
				</tr>
			</c:forEach>
		</table>
	</form>

	<script type="text/javascript">
		var msg='${msg}';
	 	 if(msg!=''){
	 	 	alert(msg);
	 	 }		  	 
	</script>
</body>
</html>
